using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using BuddhistSchools.DTO.Models.Mapping;

namespace BuddhistSchools.DTO.Models
{
    public partial class dbBuddhistSchoolsContext : DbContext
    {
        static dbBuddhistSchoolsContext()
        {
            Database.SetInitializer<dbBuddhistSchoolsContext>(null);
        }

        public dbBuddhistSchoolsContext()
            : base("Name=dbBuddhistSchoolsContext")
        {
        }

        public DbSet<Course> Courses { get; set; }
        public DbSet<Function> Functions { get; set; }
        public DbSet<GroupSubject> GroupSubjects { get; set; }
        public DbSet<Lecturer> Lecturers { get; set; }
        public DbSet<Master> Masters { get; set; }
        public DbSet<Pagoda> Pagodas { get; set; }
        public DbSet<Province> Provinces { get; set; }
        public DbSet<Role> Roles { get; set; }
        public DbSet<SchoolClass> SchoolClasses { get; set; }
        public DbSet<SchoolYear> SchoolYears { get; set; }
        public DbSet<Score> Scores { get; set; }
        public DbSet<ScoreColumn> ScoreColumns { get; set; }
        public DbSet<Student> Students { get; set; }
        public DbSet<Subject> Subjects { get; set; }
        public DbSet<sysdiagram> sysdiagrams { get; set; }
        public DbSet<Term> Terms { get; set; }
        public DbSet<Term_Subject> Term_Subject { get; set; }
        public DbSet<User> Users { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new CourseMap());
            modelBuilder.Configurations.Add(new FunctionMap());
            modelBuilder.Configurations.Add(new GroupSubjectMap());
            modelBuilder.Configurations.Add(new LecturerMap());
            modelBuilder.Configurations.Add(new MasterMap());
            modelBuilder.Configurations.Add(new PagodaMap());
            modelBuilder.Configurations.Add(new ProvinceMap());
            modelBuilder.Configurations.Add(new RoleMap());
            modelBuilder.Configurations.Add(new SchoolClassMap());
            modelBuilder.Configurations.Add(new SchoolYearMap());
            modelBuilder.Configurations.Add(new ScoreMap());
            modelBuilder.Configurations.Add(new ScoreColumnMap());
            modelBuilder.Configurations.Add(new StudentMap());
            modelBuilder.Configurations.Add(new SubjectMap());
            modelBuilder.Configurations.Add(new sysdiagramMap());
            modelBuilder.Configurations.Add(new TermMap());
            modelBuilder.Configurations.Add(new Term_SubjectMap());
            modelBuilder.Configurations.Add(new UserMap());
        }
    }
}
